﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace BAL.EstRec
{

    public class AppConfs
    { 
        public struct Configs
        {
            public string clientFileFolder ;
            public string serverFileFolder ;

            public string svrCatZipPath ;
            public string clntCatZipPath;
            public string tmpCatPath ;

            public string clientDataPath ;
            public string serverDataFolder;
            public string dataFilesFolder;

            public string cnnString ;
            //@"Data Source=localhost; Initial Catalog=CMD_DKT; User Id=sa; Password=iSMS2012W7;";
            public string scriptsPath ;
            public string scriptsFailurePath ;
            public string scriptsSuccessPath ;


            public string UpdaterProcess ;
            public string CarpetaInstalacion ;
            public string UpdateFilesFolder;
            public string UpSleep;
            public string timeSpn_h;
            public string timeSpn_m;
            public string timeSpn_s;
            public TimeSpan ts;
            public string appName;

            public string HQ_Group;
            public string FDV_Group;
            public string Admin_Group;


            public string ClientHQ;
            public string ServerHQ;

            public string PublicarRHQ;
    
            public string CierreConsolidacionLocal;
            public string CierreConsolidacionServer;
            public string ProcConsolidacionLocal;
            public string CierreVersionConsolidacionLocalHQ;
            public string CierreVersionConsolidacionLocalFDV;
            public string CierreVersionConsolidacionServer;
            //public string GetConsolidatedFiles;

            public string ConsolidacionHQ;

            public string SharedFolderFDV;

            public string ProcessedFilesSync;

            public string NumTryCreateXls;
            public string WrkPntApprovedStat;

        };

        public Configs cnf;

        public AppConfs()
        {

            try
            {
                cnf.PublicarRHQ = ConfigurationManager.AppSettings["PublicarRHQ"].ToString();

                cnf.ClientHQ = ConfigurationManager.AppSettings["ClientHQ"].ToString();
                cnf.ServerHQ = ConfigurationManager.AppSettings["ServerHQ"].ToString();

                cnf.clientFileFolder = ConfigurationManager.AppSettings["clientFileFolder"].ToString();
                cnf.serverFileFolder = ConfigurationManager.AppSettings["serverFileFolder"].ToString();

                cnf.svrCatZipPath = ConfigurationManager.AppSettings["zipFilePathSvr"].ToString();
                cnf.clntCatZipPath = ConfigurationManager.AppSettings["zipFilePathClnt"].ToString();
                cnf.tmpCatPath = ConfigurationManager.AppSettings["tmpDataFolder"].ToString();

                cnf.clientDataPath = ConfigurationManager.AppSettings["clientDataFolder"].ToString();
                cnf.serverDataFolder = ConfigurationManager.AppSettings["serverDataFolder"].ToString();
                cnf.dataFilesFolder = ConfigurationManager.AppSettings["dataFilesFolder"].ToString();

                cnf.cnnString = @"Data Source=localhost; Initial Catalog=ER_V050; User Id=sa; Password=iSMS2012W7;";
                //cnf.cnnString = @"Data Source=localhost; Initial Catalog=ER_V050;Integrated Security = Yes;";
                
                //cnf.cnnString = @"Data Source=localhost\SQL2008; Initial Catalog=ER_V050; Integrated Security=true;Integrated Security=Yes;";
                cnf.scriptsPath = ConfigurationManager.AppSettings["scriptsPath"].ToString();
                cnf.scriptsFailurePath = ConfigurationManager.AppSettings["scriptsFailurePath"].ToString();
                cnf.scriptsSuccessPath = ConfigurationManager.AppSettings["scriptsSuccessPath"].ToString();


                cnf.UpdaterProcess = ConfigurationManager.AppSettings["UpdaterProcess"].ToString();
                cnf.CarpetaInstalacion = ConfigurationManager.AppSettings["CarpetaInstalacion"].ToString();
                cnf.UpdateFilesFolder = ConfigurationManager.AppSettings["UpdateFilesFolder"].ToString();
                cnf.UpSleep = ConfigurationManager.AppSettings["UpSleep"].ToString();
                cnf.appName = ConfigurationManager.AppSettings["appName"].ToString();


                cnf.timeSpn_h = ConfigurationManager.AppSettings["TimeSpan_H"].ToString();
                cnf.timeSpn_m = ConfigurationManager.AppSettings["TimeSpan_M"].ToString();
                cnf.timeSpn_s = ConfigurationManager.AppSettings["TimeSpan_S"].ToString();

                cnf.Admin_Group = ConfigurationManager.AppSettings["Admin_Group"].ToString();
                cnf.FDV_Group = ConfigurationManager.AppSettings["FDV_Group"].ToString();
                cnf.HQ_Group = ConfigurationManager.AppSettings["HQ_Group"].ToString();

                cnf.CierreConsolidacionLocal = ConfigurationManager.AppSettings["CierreConsolidacionLocal"].ToString();
                cnf.CierreConsolidacionServer = ConfigurationManager.AppSettings["CierreConsolidacionServer"].ToString();
                cnf.ProcConsolidacionLocal = ConfigurationManager.AppSettings["ProcConsolidacionLocal"].ToString();
                cnf.CierreVersionConsolidacionLocalHQ = ConfigurationManager.AppSettings["CierreVersionConsolidacionLocalHQ"].ToString();
                cnf.CierreVersionConsolidacionLocalFDV = ConfigurationManager.AppSettings["CierreVersionConsolidacionLocalFDV"].ToString();
                cnf.CierreVersionConsolidacionServer = ConfigurationManager.AppSettings["CierreVersionConsolidacionServer"].ToString();   
                //cnf.GetConsolidatedFiles = ConfigurationManager.AppSettings["GetConsolidatedFiles"].ToString();

                cnf.ConsolidacionHQ = ConfigurationManager.AppSettings["ConsolidacionHQ"].ToString();

                cnf.SharedFolderFDV = ConfigurationManager.AppSettings["SharedFolderFDV"].ToString();

                cnf.ProcessedFilesSync = ConfigurationManager.AppSettings["ProcessedFilesSync"].ToString();

                cnf.NumTryCreateXls = ConfigurationManager.AppSettings["NumTryCreateXls"].ToString();
            }
            catch (Exception Ex)
            {

                ;
            }

        }

    }// end class

   
}
